<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * @package     Pages Module
 * @author      Matrix Infoline (infolinematrix@gmail.com
 * @copyright   (c) Matrix Infoline
 */

class Index extends Frontend_Controller
{

	public function __construct()
	{
		parent::__construct();
		$this->template->set_layout('default');

		if($this->config->item('development') == true){
			$this->load->spark('codeigniter-forensics');
			$this->output->enable_profiler(true);
		}
		
		$this->load->model(array());
		
		
	}

	public function index()
	{

		$data['category'] = $this->category_model->getCetegory(0,12,TRUE); 
		$data['state'] =  $this->location_model->getLocation(0,99); 
		
		$data['location'] =  config_item('country');
		
		$data['city'] =  $this->location_model->find($deep = 1,$limit = count($data['state']), TRUE);
		$this->template->build('home', $data);
		 
	}

}
